import requests
import unittest
from JK_UI.config.config import *
from JK_UI.api.Api import Api
class Cms_Login(unittest.TestCase):
    @classmethod
    def setUpClass(cls) -> None:
        cls.session=requests.Session()
        Api().set_session(cls.session)
        cls.se=Api().get_session()

    def test_login(self):
        api_ele=['post',cms_login_url,cms_login_data,cms_login_headers]
        Api().send_api(api_ele=api_ele)
        self.value=Api().api_json_assert()
        assert self.value['msg']=="登录成功！"

# if __name__ == '__main__':
#     unittest.main(verbosity=2)

